package edu.sctu.alex.May.day20150526;

import java.util.HashMap;

/**
 * Created by user03 on 2015/5/26.
 */
public class HashMapTest {

    public void setHashMap(int size){


        HashMap<Integer,Student>  map = new HashMap<>();
        for (int i = 0; i < size; i++) {

            Student student =  new Student();

            map.put(i,student);
            student.setName("张三"+i);
            student.setCourse(60+i);

        }
        for (int i = 0; i <size ; i++) {
            System.out.println("分数："+map.get(i).getCourse() +"    姓名："+ map.get(i).getName());
        }

    }
}
